home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / wds / nc_dic.geo / 00010_dictionary logic.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  5.0 KB  |  191 lines

  1. on startMovie
  2.   cursor([402, 403])
  3.   set the cursor of sprite 39 to [404, 405]
  4.   set the cursor of sprite 2 to [404, 405]
  5.   set the cursor of sprite 3 to [404, 405]
  6.   set the cursor of sprite 4 to [404, 405]
  7.   set the cursor of sprite 36 to [404, 405]
  8.   set the cursor of sprite 8 to [404, 405]
  9.   set the cursor of sprite 9 to [404, 405]
  10.   initConst()
  11.   initVars()
  12.   initPuppets()
  13.   StartWithA()
  14. end
  15.  
  16. on initConst
  17.   global DIC_LETTERS_SPT_BASE, DIC_LETTERS_CST_BASE, DIC_LETTERS_GREEN_CST_BASE, DIC_LETTERS_BLUE_CST_BASE, DIC_CLOSE_BOX_SPT, DIC_ARROW_UP_SPT, DIC_ARROW_DOWN_SPT, DIC_SCROLL_DIS_SPT, DIC_MAX_SLIDER_VPOS, DIC_MIN_SLIDER_VPOS
  18.   set DIC_LETTERS_SPT_BASE to 10
  19.   set DIC_LETTERS_CST_BASE to the number of cast "A1"
  20.   set DIC_LETTERS_GREEN_CST_BASE to the number of cast "A3"
  21.   set DIC_LETTERS_BLUE_CST_BASE to the number of cast "A2"
  22.   set DIC_CLOSE_BOX_SPT to 9
  23.   set DIC_ARROW_UP_SPT to 3
  24.   set DIC_ARROW_DOWN_SPT to 4
  25.   set DIC_SCROLL_DIS_SPT to 40
  26.   set DIC_MAX_SLIDER_VPOS to 212
  27.   set DIC_MIN_SLIDER_VPOS to 37
  28. end
  29.  
  30. on initVars
  31.   SET_LastHL(EMPTY)
  32.   SET_LastGreenHL(RET_LETTERS_SPT_BASE())
  33. end
  34.  
  35. on initPuppets
  36.   set the puppet of sprite RET_CLOSE_BOX_SPT() to 1
  37.   repeat with i = RET_LETTERS_SPT_BASE() to RET_LETTERS_SPT_BASE() + 26
  38.     set the puppet of sprite i to 1
  39.   end repeat
  40. end
  41.  
  42. on StartWithA
  43.   SET_LastHL(RET_LETTERS_SPT_BASE())
  44.   TouchMe()
  45. end
  46.  
  47. on mouseUp
  48.   set the castNum of sprite RET_CLOSE_BOX_SPT() to the number of cast "Close enable"
  49.   updateStage()
  50. end
  51.  
  52. on checkHl
  53.   set tempMouseCast to mouseCast()
  54.   if (tempMouseCast >= RET_LETTERS_CST_BASE()) and (tempMouseCast < (RET_LETTERS_CST_BASE() + 27)) then
  55.     if GET_LastHL() <> EMPTY then
  56.       set AsciLetter to numToChar(65 + GET_LastHL() - RET_LETTERS_SPT_BASE())
  57.       set the castNum of sprite GET_LastHL() to the number of cast (AsciLetter & "1")
  58.     end if
  59.     set newSpriteNum to tempMouseCast - RET_LETTERS_CST_BASE() + RET_LETTERS_SPT_BASE()
  60.     set AsciLetter to numToChar(65 + tempMouseCast - RET_LETTERS_CST_BASE())
  61.     set the castNum of sprite newSpriteNum to the number of cast (AsciLetter & "2")
  62.     SET_LastHL(newSpriteNum)
  63.     updateStage()
  64.   else
  65.     if not ((tempMouseCast >= RET_LETTERS_BLUE_CST_BASE()) and (tempMouseCast < (RET_LETTERS_BLUE_CST_BASE() + 27))) then
  66.       if GET_LastHL() <> EMPTY then
  67.         set AsciLetter to numToChar(65 + GET_LastHL() - RET_LETTERS_SPT_BASE())
  68.         set the castNum of sprite GET_LastHL() to the number of cast (AsciLetter & "1")
  69.       end if
  70.       SET_LastHL(EMPTY)
  71.     end if
  72.   end if
  73. end
  74.  
  75. on TouchMe
  76.   if GET_LastGreenHL() <> EMPTY then
  77.     set AsciLetter to numToChar(65 + GET_LastGreenHL() - RET_LETTERS_SPT_BASE())
  78.     set the castNum of sprite GET_LastGreenHL() to the number of cast (AsciLetter & "1")
  79.   end if
  80.   set AsciLetter to numToChar(65 + GET_LastHL() - RET_LETTERS_SPT_BASE())
  81.   set the castNum of sprite GET_LastHL() to the number of cast (AsciLetter & "3")
  82.   SET_LastGreenHL(GET_LastHL())
  83.   SET_LastHL(EMPTY)
  84.   set spriteToChange to GetMovingSprite()
  85.   if AsciLetter = "[" then
  86.     set castExists to the number of cast get_FrameName()
  87.     if castExists = -1 then
  88.       set the castNum of sprite spriteToChange to the number of cast "no relevant"
  89.       init()
  90.       updateStage()
  91.       sound playFile 1, "NC_DIC.S01"
  92.       repeat while soundBusy(1)
  93.       end repeat
  94.     else
  95.       set the castNum of sprite spriteToChange to the number of cast get_FrameName()
  96.     end if
  97.   else
  98.     set the castNum of sprite spriteToChange to the number of cast ("text-" & AsciLetter)
  99.   end if
  100.   init()
  101.   updateStage()
  102. end
  103.  
  104. on BeforeClose
  105.   set the castNum of sprite RET_CLOSE_BOX_SPT() to the number of cast "Close Click"
  106.   updateStage()
  107. end
  108.  
  109. on closeMe
  110.   global DicWindow
  111.   set the castNum of sprite RET_CLOSE_BOX_SPT() to the number of cast "Close enable"
  112.   updateStage()
  113.   close(DicWindow)
  114.   StartWithA()
  115.   go("halt")
  116.   tell the stage
  117.     closeGLOSSARYwindow()
  118.   end tell
  119. end
  120.  
  121. on SET_LastHL sprtNum
  122.   global DIC_LastHL
  123.   set DIC_LastHL to sprtNum
  124. end
  125.  
  126. on GET_LastHL
  127.   global DIC_LastHL
  128.   return DIC_LastHL
  129. end
  130.  
  131. on SET_LastGreenHL sprtNum
  132.   global DIC_LastGreenHL
  133.   set DIC_LastGreenHL to sprtNum
  134. end
  135.  
  136. on GET_LastGreenHL
  137.   global DIC_LastGreenHL
  138.   return DIC_LastGreenHL
  139. end
  140.  
  141. on get_FrameName
  142.   global FrameName
  143.   set FrameName to string(Get_CurrentTool())
  144.   return FrameName
  145. end
  146.  
  147. on Get_CurrentTool
  148.   global CurrentTool
  149.   return CurrentTool
  150. end
  151.  
  152. on RET_LETTERS_SPT_BASE
  153.   global DIC_LETTERS_SPT_BASE
  154.   return DIC_LETTERS_SPT_BASE
  155. end
  156.  
  157. on RET_LETTERS_CST_BASE
  158.   global DIC_LETTERS_CST_BASE
  159.   return DIC_LETTERS_CST_BASE
  160. end
  161.  
  162. on RET_LETTERS_GREEN_CST_BASE
  163.   global DIC_LETTERS_GREEN_CST_BASE
  164.   return DIC_LETTERS_GREEN_CST_BASE
  165. end
  166.  
  167. on RET_LETTERS_BLUE_CST_BASE
  168.   global DIC_LETTERS_BLUE_CST_BASE
  169.   return DIC_LETTERS_BLUE_CST_BASE
  170. end
  171.  
  172. on RET_CLOSE_BOX_SPT
  173.   global DIC_CLOSE_BOX_SPT
  174.   return DIC_CLOSE_BOX_SPT
  175. end
  176.  
  177. on RET_SCROLL_DIS_SPT
  178.   global DIC_SCROLL_DIS_SPT
  179.   return DIC_SCROLL_DIS_SPT
  180. end
  181.  
  182. on RET_MAX_SLIDER_VPOS
  183.   global DIC_MAX_SLIDER_VPOS
  184.   return DIC_MAX_SLIDER_VPOS
  185. end
  186.  
  187. on RET_MIN_SLIDER_VPOS
  188.   global DIC_MIN_SLIDER_VPOS
  189.   return DIC_MIN_SLIDER_VPOS
  190. end
  191.